﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SernaJson
{
    public class SerializationSettings
    {
        public enum eDateTimeFormat
        {
            /// <summary>
            /// yyyy-MM-ddTHH:mm:ss.msZ (Z for UTC)
            /// In JS can be obtained like new Date(str)
            /// </summary>
            ISO8601,
            /// <summary>
            /// Unix Time (quantity of seconds since Epoch. Positive or negative)
            /// /// In JS can be obtained like new Date(str)
            /// </summary>
            UnixTime,
            /// <summary>
            /// \/Date(1293034567877)\/ ...Framed Unix Time
            /// </summary>
            JavaScriptSerializer
        }

        public SerializationSettings()
        {
            //StringSerialization_SkipUnnecessarySmbols = false;

        }

        //public eDateTimeFormat DateTimeFormat = eDateTimeFormat.Ticks;
        ///// <summary>
        ///// Default is false for readability
        ///// </summary>
        //public bool StringSerialization_SkipUnnecessarySmbols { get; set; }

        /// <summary>
        /// Framing for key/value names. Default is ' but can be cahnged on " 
        /// </summary>
        public char Framing = '"';
        //public char Framing = '\'';
        /// <summary>
        /// Delimiter between properties. Default is , 
        /// </summary>
        public char Delimiter = ',';

        /// <summary>
        /// Defualt is Unix Time (quantity of seconds since Epoch).
        /// new Date(str in any format) then http://www.w3schools.com/js/js_date_methods.asp
        /// </summary>
        public eDateTimeFormat DateTimeFormat = eDateTimeFormat.UnixTime;

        /// <summary>
        /// Such way will be null visualized while serialization
        /// </summary>
        public string NullIdentifier = "null";
        /// <summary>
        /// Such way will be true visualized while serialization
        /// </summary>
        public string TrueIdentifier = "true";
        /// <summary>
        /// Such way will be true visualized while serialization
        /// </summary>
        public string FalseIdentifier = "false";
    }
}
